#ifndef VECTOR2_H
#define VECTOR2_H
#include <math.h>
#include <iostream>
#include "GeoMath.h"

using namespace std;

/*
*	___ vector2 Header___
*
*
**************************************************************
*/



class Vector2
{
		float _x,_y,_w;
	public:
		//Constructors
		Vector2();
		Vector2( const Vector2& vec );

		Vector2( float x, float y);

		Vector2( float x, float y, float w );

		//Getter/Setter
		float getX() const;

		float getY() const;

		float getW() const;

		void setX(float x);

		void setY(float y);

		void setW(float w);

		float getAbsolute() const;
		
		float getSquare() const;

		void setLength( float length );

		float getAngle( const Vector2& vec2) const;
			
		Vector2 operator + (const Vector2& vec2) const;
		void operator += (const Vector2& vec2);

		Vector2 operator - (const Vector2& vec2) const;
		void operator -= (const Vector2& vec2);

		float operator * (const Vector2& vec2) const;

		Vector2 operator * (float scalar) const;
		void operator *= (float scalar);

		Vector2 operator / (float scalar) const;
		void operator /= (float scalar);

		bool isNullVector() const;

		Vector2 getNormal() const;

		void normalize();
		
		float componentsSum() const;

		Vector2 projectionOn( const Vector2& vec2 ) const;
		
		friend ostream & operator<< (ostream &o, const Vector2 &vec);
};


/***************************************************************/
#endif
